package com.twu.biblioteca;

/**
 * Created with IntelliJ IDEA.
 * User: ysotirov
 * Date: 25/01/13
 * Time: 10:45
 * To change this template use File | Settings | File Templates.
 */
/**A class that holds the book object and all its properties */
public class book {

    String Title;
    private boolean reserved;
    String userID = "";

    public book(String title){
        Title = title ;
        reserved=false;
    }

    public String reserveBook(){
        if (isAvailable() == true)
        {
            reserved = true;
            return "Thank You! Enjoy the book.";
        }
        else {
            return "Sorry we don't have that book yet.";
        }
    }

    public boolean isAvailable(){
        if (reserved == true) return false;
        return true;
    }
}
